package fr.zadoka.zadokadna.Loader;

import java.util.GregorianCalendar;

import fr.zadoka.zadokadna.Connectivity.DailyImageLoader;
import fr.zadoka.zadokadna.Connectivity.UrlImageLoader;
import fr.zadoka.zadokadna.Util.CalendarUtil;

public class ZadokaImageLoaderFactory {

	public UrlImageLoader getLoader(GregorianCalendar date)
	{
		GregorianCalendar nowDate = new GregorianCalendar();
		
		if (CalendarUtil.isSameDate(nowDate, date))
			return new DailyImageLoader();
		else
			return new UrlImageLoader();
	}
}
